package com.vhall.component.controller.watchlimit.facade;

import com.vhall.component.entity.room.vo.ApplyEntityDTO;
import com.vhall.component.entity.watchlimit.dto.ApplyUserEntityDTO;
import com.vhall.component.entity.watchlimit.dto.WhiteAccountsEntityDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 观看限制
 * @author lsl
 * @since 2021/6/25 17:08
 */
@FeignClient(value = "WatchLimitInnerFacade", path = "/v4/watch-limit/inner")
public interface WatchLimitInnerFacade {

    /**
     * 白名单检测
     *
     * @param roomId   房间id
     * @param password 密码
     * @param phone    手机号
     * @return Boolean
     */
    @GetMapping("/check-white-account")
    Boolean checkWhiteAccount(@RequestParam("roomId") String roomId, @RequestParam("password") String password, @RequestParam("phone") String phone);

    /**
     * getApply
     *
     * @param ilId 房间id
     * @return 返回值
     */
    @GetMapping("/get-apply")
    ApplyEntityDTO getApply(@RequestParam("ilId") String ilId);

    /**
     * getApplyUserByPhoneAndIlId
     *
     * @param ilId  房间id
     * @param phone phone
     * @return 返回值
     */
    @GetMapping("/get-apply-user")
    ApplyUserEntityDTO getApplyUserByPhoneAndIlId(@RequestParam("ilId") Integer ilId, @RequestParam("phone") Long phone);

    /**
     * getWhiteAccountsByNameAndIlId
     *
     * @param ilId      房间id
     * @param whitename whitename
     * @return 返回值
     */
    @GetMapping("/get-white-accounts")
    WhiteAccountsEntityDTO getWhiteAccountsByNameAndIlId(@RequestParam("ilId") Integer ilId, @RequestParam("whitename") Long whitename);

}
